import httpAxios from "@/utils/httpRequest/httpAxios";
import type { ResponseTypeData, LoginData, MenuData } from './login.d.ts'

// 登录的接口
// export const login = (params: any) =>
//     httpAxios.request<ResponseTypeData<LoginData>>({
//         url: '/login',
//         method: 'post',
//         data: params
//     })

export const login = (params: any) => httpAxios.post<ResponseTypeData<LoginData>>({
    url: '/login',
    data: params
})

// 获取菜单列表的接口
export const getMenu = (uid: number) => httpAxios.get<ResponseTypeData<MenuData>>({
    url: '/getmenu',
    params: { uid }
})
